package com.sumainfor.pc.gmio.controller.tenant;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.impl.DiComplaintSerivceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 功能描述:
 * 租客端发起投诉
 * @Auther: zhlu
 * @Date: 2019/5/11 10:55
 * @Description:
 */
@RestController
@RequestMapping("/tenant/key/complaint")
public class TenantComplaintController {

    @Autowired
    DiComplaintSerivceImpl DiComplaintSerivceImpl;

    /**
     * 功能描述: 
     * 租客端发起投诉
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/11 10:58
     */
    @RequestMapping(value = "/AddTenantComplaint",method = RequestMethod.POST)
    public JsonResult AddTenantComplaint(@RequestBody Map<String,Object> params){
        JsonResult result=new JsonResult();
        if(DiComplaintSerivceImpl.AddTenantComplaint(params)){
            result.putSuccess("投诉发送成功！");
        }else{
            result.putFailed("服务器繁忙，请稍后重试！");
        }
        return result;
    }

}
